<%@ Page Title="Page Guide" Language="C#" MasterPageFile="~/Views/Shared/MobileCenterMasterPage.Master"
    Inherits="System.Web.Mvc.ViewPage<EPiServer.Research.MobileCenter.Models.PageGuideModel>" %>
    
<%@ Import Namespace="EPiServer.Cms.Shell" %>
<%@ Import Namespace="EPiServer.Shell.Web.Mvc.Html" %>
<%@ Import Namespace="EPiServer.Cms.Shell.UI.Models" %>
<%@ Import Namespace="EPiServer.Configuration.PageGuide" %>
<%@ Import Namespace="EPiServer.Configuration" %>

<asp:Content ContentPlaceHolderID="HeadContent" runat="server">

<link rel="Stylesheet" type="text/css" href="../modules/MobileCenterExampleGadgets/Content/createpage.css" />

</asp:Content>

<asp:Content ContentPlaceHolderID="MainContentArea" runat="server">


<% Html.BeginGadgetForm("GetPageGuide"); %>
<div id="create-mobilecenter-table">

    <%= Html.Hidden("PageGuide.Name", Model.Name) %>
    <%= Html.Hidden("PageGuide.PageTypeName", Model.PageTypeName)%>
    <%= Html.Hidden("PageGuide.Title", Model.Title)%>
    <%= Html.Hidden("PageGuide.DestionPageID", Model.DestionPageID)%>

    <% if (!String.IsNullOrEmpty((string)ViewData["Error"]))
       { %>
    <div class="error">
        <%= (string)ViewData["Error"]%>
    </div>
    <%} %>
    <ul>
         <% string prefix = "PageGuide"; %>
         <% int index = 0; %>
         <% foreach (string PropertyName in Model.StringProperties.Keys)
            {%>
               <li>
                 <div class="small-padding">
                <span><%= PropertyName %> </span>
                    <%= Html.Hidden(prefix + ".StringProperties[" + index + "].Key", PropertyName)%>
                <%= Html.TextBox(prefix + ".StringProperties[" + index + "].Value", Model.StringProperties[PropertyName], new { @class = "create-textbox", id = prefix + "_StringProperties[" + PropertyName + "].Value" })%></div>
              
              </li>
              <% index++; %>
                
           <% } %>
             <% index = 0; %>
             <% foreach (string PropertyName in Model.XhtmlProperties.Keys)
            {%>
              
              <li>
                 <div class="small-padding">
                <span><%= PropertyName %> </span>
                <%= Html.Hidden(prefix + ".XhtmlProperties[" + index + "].Key", PropertyName) %>
                <%= Html.TextArea(prefix + ".XhtmlProperties[" + index + "].Value", Model.XhtmlProperties[PropertyName], new { @class = "create-textarea", id = prefix + "_XhtmlProperties[" + PropertyName + "].Value" })%></div>
              
              </li> 
               <% index++; %>
           <% } %>
           
               <li>
            <div class="small-padding">
                <%= Html.DropDownList("Action", ViewData["DropDownOptions"] as IEnumerable<SelectListItem>)  %>
                 <span>Action: </span>
                </div>
        </li>

    
    </ul>
    <div class="small-padding align-middle">
 
        <%= Html.AcceptButton()%>
        <%= Html.CancelButton()%>
    </div>
</div>
<% Html.EndForm(); %>


</asp:Content>
